<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5"
>
<!--顶部导航栏-->
<!-- navbar-->
<header class="header" th:fragment="common_navbar">
    <nav class="navbar">
        <div class="container-fluid">
            <div class="navbar-holder d-flex align-items-center justify-content-between">
                <div class="navbar-header"><a id="toggle-btn" href="#" class="menu-btn"><i class="icon-bars"> </i></a><a
                        th:href="@{/admin/admin_index.html}" class="navbar-brand">
                    <div class="brand-text d-none d-md-inline-block"><span
                            style="padding-right: 5px">管理员登录 </span><strong class="text-primary">企业考试管理系统</strong></div>
                </a></div>
                <ul class="nav-menu list-unstyled d-flex flex-md-row align-items-md-center">
                    <!-- Languages dropdown    -->
                    <li class="nav-item dropdown"><a id="languages" rel="nofollow" data-target="#" href="#"
                                                     data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
                                                     class="nav-link language"><img
                            th:src="@{/static/img/flags/16/CN.png}" alt="Chinese"><span
                            class="d-none d-sm-inline-block">中 国</span></a>
                    </li>
                    <!-- Log out-->
                    <li class="nav-item"><a th:href="@{/admin/admin_logout.html}" class="nav-link logout"> <span
                            class="d-none d-sm-inline-block">注销</span><i class="fa fa-sign-out"></i></a></li>
                </ul>
            </div>
        </div>
    </nav>
</header>
<!--侧边导航栏-->
<!-- Side Navbar -->
<nav class="side-navbar" th:fragment="common_sidebar">
    <div class="side-navbar-wrapper">
        <!-- Sidebar Header    -->
        <div class="sidenav-header d-flex align-items-center justify-content-center">
            <!-- User Info--><a th:href="@{/admin/admin_toupdate.html}">
            <div class="sidenav-header-inner text-center"><img th:src="@{/static/img/avatar-13.jpg}" alt="person"
                                                               class="img-fluid rounded-circle">
                <h2 th:if="${session.admin==null}" class="h5" >NULL</h2><span th:if="${session.admin==null}">NULL</span>
                <h2 th:if="${session.admin!=null}" class="h5" th:text="${'管理员编号:'+session.admin.getId()}"></h2><span
                        th:if="${session.admin!=null}"     th:text="${'管理员账号:'+session.admin.getUsername()}"></span>
            </div>
        </a>
            <!-- Small Brand information, appears on minimized sidebar-->
            <div class="sidenav-header-logo"><a th:href="@{/admin/admin_index.html}" class="brand-small text-center"> <strong>B</strong><strong
                    class="text-primary">D</strong></a></div>
        </div>
        <!-- Sidebar Navigation Menus-->
        <div class="main-menu">
            <h5 class="sidenav-heading">管理员操作</h5>
            <ul id="side-main-menu" class="side-menu list-unstyled">
                <li><a th:href="@{/admin/admin_index.html}"> <i class="icon-home"></i>主页</a></li>
                <li><a th:href="@{/admin/examinee_manage.html}"> <i class="icon-user"></i>考生管理</a></li>
                <li><a th:href="@{/admin/testpaper_manage.html}"> <i class="icon-padnote"></i>试卷管理</a></li>
                <li><a th:href="@{/admin/record_manage.html}"> <i class="icon-check"></i>成绩管理</a></li>
                <li><a th:href="@{/admin/testlib_manage.html}"> <i class="icon-list"></i>题库管理</a></li>
                <li><a th:href="@{/admin/manager_manage.html}"> <i class="icon-list-1"></i>管理员管理</a></li>
            </ul>
        </div>
        <div class="admin-menu" sec:authorize="hasRole('SUPERADMIN')">
            <h5 class="sidenav-heading">超级管理员</h5>
            <ul id="side-admin-menu" class="side-menu list-unstyled">
                <li><a th:href="@{/admin/apartment_manage.html}"> <i class="icon-screen"> </i>部门管理</a></li>
                <li><a th:href="@{/admin/testpaper_examine.html}"> <i class="icon-form"> </i>试卷审核</a></li>
                <li><a th:href="@{/admin/manager_manageinfo.html}"> <i class="icon-interface-windows"></span> </i>权限管理</a>
                </li>
            </ul>
        </div>
    </div>
</nav>
</html>